package com.deluxelx.rmo.common.util;

import com.deluxelx.rmo.common.constants.IllegalWords;
import toolgood.words.StringSearchEx2;

/**
 * 敏感词检验工具包
 */
public class ToolWordsUtil {

    private static final StringSearchEx2 searchEx2 = new StringSearchEx2();
    static {
        searchEx2.SetKeywords(IllegalWords.getInstance().getIllegalWords());
    }

    public static Boolean isIllegalWords(String msg) {
        return searchEx2.ContainsAny(msg) ? Boolean.TRUE : Boolean.FALSE;
    }

}
